<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
    </style>
</head>
<body>
    <div id="app">
        <atguigu-div></atguigu-div>
    </div>
</body>
<script src="../../js/vue.js"></script>
<script>
    //根组件app
    new Vue({
        el:"#app",
        data:{msg:"xxx"},
        // 局部组件
        components:{
            "atguigu-div":{
                template:"<div><div>{{msg}}</div> <span>{{msg}}</span></div>",
                data:function () {
                    return {
                        msg:"达姆 ❤ 周冬雨"
                    }
                }
            }
        }
    })
</script>
</html>